<?php

/**
 * ---------------------------------------------------------------
 * Oemahcode APPLICATION ENVIRONMENT
 * ---------------------------------------------------------------
 *
 * Change some value of variables below to make this application
 * to running well in your personal pc/laptop. Random changes will
 * make this application show some errors. Beware!
 */

/**
 * ---------------------------------------------------------------
 * DO NOT USE NON ALPHA-NUMERIC CHARACTER!
 * ---------------------------------------------------------------
 */
$oc_title = 'Han.co.id';

/**
 * ---------------------------------------------------------------
 * PLEASE, LET THEM LIKE THAT.
 * ---------------------------------------------------------------
 */
$oc_db_hostname	= array();
$oc_db_username	= array();
$oc_db_password	= array();
$oc_db_database	= array();
$oc_db_driver	= array();
$oc_db_active	= array();

/**
 * ---------------------------------------------------------------
 * CHANGE THE FOLLOWING SETTINGS ACCORDING TO YOUR COMPUTER/LAPTOP
 * ---------------------------------------------------------------
 */
$oc_db_start	= FALSE;

switch ($_SERVER['HTTP_HOST'])
{
	case 'han.co.id':
	case 'kreasiibujuara.com':
	case 'www.han.co.id':
		$oc_db_hostname[]	= 'localhost';
		$oc_db_username[]	= 'root';
		$oc_db_password[]	= 'admin';
		$oc_db_database[]	= 'han';
		$oc_db_driver[]      = 'mysql';
		$oc_db_active[]      = 'default';
		$oc_time_out         = 7200;
		$oc_env				= 'development';
		$oc_email			= 'info@han.co.id';
	break;
	default:
		switch ($_SERVER['SERVER_ADMIN']) {
			case 'iwan@oemahcode':
				$oc_db_hostname[]    = 'localhost';
				$oc_db_username[]    = 'root';
				$oc_db_password[]    = 'admin';
				$oc_db_database[]    = 'han';
				$oc_db_driver[]      = 'mysql';
				$oc_db_active[]      = 'default';
				$oc_time_out         = 7200;
				$oc_env				= 'development';
				$oc_email			= 'ones006@gmail.com';
			break;
			case 'admin@localhost':
				$oc_db_hostname[]    = 'localhost';
				$oc_db_username[]    = 'root';
				$oc_db_password[]    = 'root';
				$oc_db_database[]    = 'han';
				$oc_db_driver[]      = 'mysql';
				$oc_db_active[]      = 'default';
				$oc_time_out         = 7200;
				$oc_env				 = 'development';
				$oc_email			 = 'mentioniman@gmail.com';
			break;
		}
	break;
}

/*
 *---------------------------------------------------------------
 * APPLICATION ENVIRONMENT
 *---------------------------------------------------------------
 *
 * You can load different configurations depending on your
 * current environment. Setting the environment also influences
 * things like logging and error reporting.
 *
 * This can be set to anything, but default usage is:
 *
 *     development
 *     testing
 *     production
 *
 * NOTE: If you change these, also change the error_reporting() code below
 *
 */
	define('ENVIRONMENT', $oc_env);
/*
 *---------------------------------------------------------------
 * ERROR REPORTING
 *---------------------------------------------------------------
 *
 * Different environments will require different levels of error reporting.
 * By default development will show errors but testing and live will hide them.
 */

if (defined('ENVIRONMENT'))
{
	switch (ENVIRONMENT)
	{
		case 'development':
			ini_set('display_errors', '1');
			ini_set('short_open_tag', '1');
			ini_set('display_startup_errors', '1');
			ini_set('log_errors', '1');
			ini_set('track_errors', '1');
			ini_set('html_errors', '1');
			ini_set('date.timezone', 'Asia/Jakarta');
			error_reporting(E_ALL | E_STRICT);
		break;
		case 'testing':
		case 'production':
			ini_set('display_errors', '0');
			ini_set('short_open_tag', '1');
			ini_set('display_startup_errors', '0');
			ini_set('log_errors', '1');
			ini_set('track_errors', '0');
			ini_set('html_errors', '0');
			ini_set('date.timezone', 'Asia/Jakarta');
			error_reporting(NULL);
		break;
		default:
			exit('The application environment is not set correctly.');
	}
}

require_once 'bootstrap.php';
